function ber=homework2plotting_part2()

power=100;	
noise=1;	
correl1=.3;
correl2=.3;
%training=[5 8 10 15 20 80 320];
training=5:5:25;
largenumber=15;

antennas=[4];
ber=0;
for k=1:largenumber
	k
	ber=homework2(power,noise,correl1,correl2,antennas,training)+ber;
end
ber=1-ber/largenumber;

ber

ber_real=ber;
x=training;

figure;
plot(x,ber_real(:,:,1,1),'b.-',x,ber_real(:,:,2,1),'c.-',x,ber_real(:,:,3,1),'r.-',x,ber_real(:,:,4,1),'m.-');
ylabel('Bit Error Rate');
xlabel('Training Symbols * 4');
legend('Sphere Correlated', 'Simple Correlated', 'ZF Ordering Correlated', 'MMSE Nulling Correlated');
title('BER rate vs Training Symbols for Correlated Fading');

figure;
plot(x,ber_real(:,:,1,2),'b.-',x,ber_real(:,:,2,2),'c.-',x,ber_real(:,:,3,2),'r.-',x,ber_real(:,:,4,2),'m.-');
ylabel('Bit Error Rate');
xlabel('Training Symbols * 4');
legend('Sphere Uncorrelated', 'Simple Uncorrelated', 'ZF Ordering Uncorrelated', 'MMSE Nulling Uncorrelated');
title('BER rate vs Training Symbols for Independent Fading');

